package day3.p4;

import java.io.IOException;
import java.util.Scanner;

public class MyCalc {
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		System.out.println("Enter two numbers: ");
		int a = sc.nextInt();
		int b = sc.nextInt();
		Number myNum = new Number(a, b);
		System.out.println("Operation (+ - / *): ");
		String op = sc.next();
		if (op.charAt(0) == '+') {
			myNum.add();
			myNum.display();
		} else if (op.charAt(0) == '-') {
			myNum.sub();
			myNum.display();
		} else if (op.charAt(0) == '*') {
			myNum.mul();
			myNum.display();
		} else if (op.charAt(0) == '/') {
			myNum.div();
			myNum.display();
		} else
			System.out.println("Invalid option");
	}
}
